﻿#ifndef __AS_GRAPHICS_EVENTS__
#define __AS_GRAPHICS_EVENTS__

#include "AsGraphicsBasics.h"

__AS_JY(Update 2023.1.7)
class AS_GRAPHICS_API AsGraphicsEvents {

	friend class AS_MEMBER_CLASS(AsGraphics);
private:
	explicit AsGraphicsEvents(QGraphicsView* graphics);
	~AsGraphicsEvents();

private:
	AS_MEMBER_CLASS(AsGraphicsEvents)* m;

public:
	bool	isPressed(AG::Key::Enum key);

	bool	isMovePressedMouse();
	bool	isPress_MouseLeft();
	bool	isPress_MouseRight();
	bool	isPress_Ctrl();
	bool	isPress_Shift();
	bool	isPress_Alt();
	bool	isDoubleClicked_MouseLeft();
	bool	isDoubleClicked_MouseRight();

	int		getPressMouseButton();
	int		getDoubleClickedMouseButton();
	int		getReleaseMouseButton();
	int		getPressKey();
	int		getReleaseKey();

	QPointF	getMousePos(AG::CoordSystem::Enum type = AG::CoordSystem::Graphic);
	QPointF	getMousePressPos(AG::CoordSystem::Enum type = AG::CoordSystem::Graphic);
	QPointF	getMouseReleasePos(AG::CoordSystem::Enum type = AG::CoordSystem::Graphic);
	QPointF	getMouseMoveDistance(AG::CoordSystem::Enum type = AG::CoordSystem::Graphic);
	QPointF	getMousePressMoveDistance(AG::CoordSystem::Enum type = AG::CoordSystem::Graphic);
	QRectF	getMousePressMoveRect(AG::CoordSystem::Enum type = AG::CoordSystem::Graphic, QPointF offset = QPoint(0, 0));

	QPointF	getMousePos_keyPress(AG::CoordSystem::Enum type = AG::CoordSystem::Graphic);
	QPointF	getMousePos_keyRelease(AG::CoordSystem::Enum type = AG::CoordSystem::Graphic);

	int		getWheelDistance();

public:
	const QMimeData* getMimeData();

};

#endif